package com.yunhe.marketing.client;

import com.yunhe.marketing.client.fallback.ItemClientFallbackFactory;
import com.yunhe.common.model.ResultObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @Author: DongWenYu
 * @Date: 2021/3/1 16:07
 */
@ApiIgnore
@FeignClient(value = "yh-option", fallbackFactory = ItemClientFallbackFactory.class)
@Component
public interface ItemClient {


    @RequestMapping(value = "/item/getItemByItemCodeAndEnumName", method = RequestMethod.GET)
    ResponseEntity<ResultObject> getItemByItemCodeAndEnumName(@RequestParam(value = "name") String name);
}
